#include <iostream>
using namespace std;

int arr[100005], tmp[100005];

void merge_sort(int* arr, int left, int right)
{
    if(left >= right) return;
    
    int l = left, mid = (left + right) / 2, r = mid + 1, cur = left;
    merge_sort(arr, left, mid);
    merge_sort(arr, mid + 1, right);
    
    while(l <= mid && r <= right) tmp[cur++] = arr[l] <= arr[r] ? arr[l++] : arr[r++];
    while(l <= mid) tmp[cur++] = arr[l++];
    while(r <= right) tmp[cur++] = arr[r++];
    
    for(int i = left; i <= right; ++i) arr[i] = tmp[i];
}

int main()
{
    int n; cin >> n;
    for(int i = 0; i < n; ++i) cin >> arr[i];
    merge_sort(arr, 0, n - 1);
    for(int i = 0; i < n; ++i) cout << arr[i] << ' ';
    
    return 0;
}